import re

html = '''
<p>Via Fabio Filzi, 25/A<br/>
20124 Milano (ITALY)<br/>
Phone +39 02 6771681<br/>
Fax +39 02 67716820</p>
'''


reg_fax = re.compile(r'(FAX|传真)[：:]?[ ]?([ \d()+-.]+)', re.I | re.S)
reg_tel = re.compile(r'(Tel|Telefon|电话|手机|Phone|联系|联系方式|专线|热线|致电|call)[ ]?[.:：]?([ \d()+-.]{2,})', re.I | re.S)
r = reg_fax.findall(html)
print(r)

from redis import ConnectionPool, Redis
#获取redis服务器连接
# def getRedis():
#     while True:
#         try:
#             pool = ConnectionPool(host='192.168.8.211', port=6379, db=0, password=None,
#             decode_responses=True, health_check_interval=30)
#             redis = Redis(connection_pool=pool)
#             redis.ping()
#         except Exception as e:
#             print('redis连接失败,正在尝试重连')
#             continue
#         else:
#             return redis
